/*
 * status_codes.h
 *
 *  Created on: Sep 13, 2013
 *      Author: Ken Arok
 */

#ifndef STATUS_CODES_H_
#define STATUS_CODES_H_

/**
 * Status code that may be returned by shell commands and protocol
 * implementations.
 *
 * Any change to these status codes and the corresponding
 * message strings is strictly forbidden. New codes can be added,
 * however, but make sure that any message string tables are updated
 * at the same time.
 */
typedef enum  {
	STATUS_OK               	=  0, //!< Success
	ERR_IO_ERROR            	=  -1, //!< I/O error
	ERR_FLUSHED             	=  -2, //!< Request flushed from queue
	ERR_TIMEOUT             	=  -3, //!< Operation timed out
	ERR_BAD_DATA            	=  -4, //!< Data integrity check failed
	ERR_PROTOCOL            	=  -5, //!< Protocol error
	ERR_UNSUPPORTED_DEV     	=  -6, //!< Unsupported device
	ERR_NO_MEMORY           	=  -7, //!< Insufficient memory
	ERR_INVALID_ARG         	=  -8, //!< Invalid argument
	ERR_BAD_ADDRESS         	=  -9, //!< Bad address
	ERR_BUSY                	=  -10, //!< Resource is busy
	ERR_BAD_FORMAT          	=  -11, //!< Data format not recognized
	ERR_NO_TIMER            	=  -12, //!< No timer available
	ERR_TIMER_ALREADY_RUNNING   =  -13, //!< Timer already running
	ERR_TIMER_NOT_RUNNING   	=  -14, //!< Timer not running
	OPERATION_IN_PROGRESS		= -128,
} status_code_t;


#endif /* STATUS_CODES_H_ */
